package br.com.view;

import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.layout.GridPane;

public class GradeCartao extends GridPane {

	private Label labelCartao;
	private Label labelRetornoIdCartao;
	private Label labelModelo;
	private Label labelRetornoModelo;
	private Label labelPartnumber;
	private Label labelRetornoPartnumber;
	private Label labelTipo;
	private Label labelRetornoTipo;
	private Label labelVerFirmware;
	private Label labelRetornoVerFirmware;
	private Label labelDatainstalacao;
	private Label labelRetornoDatainstalacao;
	private Label labelPosicao;
	private Label labelRetornoPosicao;

	private static Arvore arvore;

	@SuppressWarnings("static-access")
	public GradeCartao() {

		if (arvore == null) {
			arvore = new Arvore();
		}

		this.setHgap(3);
		this.setVgap(3);
		this.setPadding(new Insets(3));
		this.setAlignment(Pos.CENTER_LEFT);

		labelCartao = new Label("Cartão: ");
		this.setConstraints(labelCartao, 0, 1);

		labelRetornoIdCartao = new Label();
		this.setConstraints(labelRetornoIdCartao, 1, 1);

		labelModelo = new Label("Modelo: ");
		this.setConstraints(labelModelo, 0, 2);

		labelRetornoModelo = new Label();
		this.setConstraints(labelRetornoModelo, 1, 2);

		labelPartnumber = new Label("Part Number: ");
		this.setConstraints(labelPartnumber, 0, 3);

		labelRetornoPartnumber = new Label();
		this.setConstraints(labelRetornoPartnumber, 1, 3);

		labelTipo = new Label("Tipo: ");
		this.setConstraints(labelTipo, 0, 4);

		labelRetornoTipo = new Label();
		this.setConstraints(labelRetornoTipo, 1, 4);

		labelVerFirmware = new Label("Versão do Firmware: ");
		this.setConstraints(labelVerFirmware, 0, 5);

		labelRetornoVerFirmware = new Label();
		this.setConstraints(labelRetornoVerFirmware, 1, 5);

		labelDatainstalacao = new Label("Data de Instalação: ");
		this.setConstraints(labelDatainstalacao, 0, 6);

		labelRetornoDatainstalacao = new Label();
		this.setConstraints(labelRetornoDatainstalacao, 1, 6);

		labelPosicao = new Label("Posição: ");
		this.setConstraints(labelPosicao, 0, 7);

		labelRetornoPosicao = new Label();
		this.setConstraints(labelRetornoPosicao, 1, 7);

		this.getChildren().addAll(labelCartao, labelRetornoIdCartao, labelModelo,
				labelRetornoModelo, labelPartnumber, labelRetornoPartnumber, labelTipo,
				labelRetornoTipo, labelVerFirmware, labelRetornoVerFirmware,
				labelDatainstalacao, labelRetornoDatainstalacao, labelPosicao,
				labelRetornoPosicao);

	}
}
